-
Notifications
You must be signed in to change notification settings - Fork 4
Interactive mode settings: add support for scientific notation #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR aims to add support for scientific notation in interactive mode settings by replacing the previous input implementation that used a keyfilter validation pattern with a new InputScientificNumber component. The motivation is to fix issue #371 where users couldn't type the 'e' character in scientific notation values like "1.0e-7".
Changes:
- Created a new
InputScientificNumbercomponent that accepts text input and parses it usingparseFloat - Replaced the previous
InputTextwith keyfilter validation inInputWidget.vuewith the new component - Replaced all
InputNumbercomponents inSimulationExperimentViewSettingsDialog.vuewithInputScientificNumber - Updated
@types/nodefrom version 25.0.10 to 25.1.0
Reviewed changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/renderer/src/components/widgets/InputScientificNumber.vue | New component that wraps InputText and handles scientific notation input through parseFloat parsing |
| src/renderer/src/components/widgets/InputWidget.vue | Refactored to use InputScientificNumber instead of InputText with keyfilter, simplified input handling logic |
| src/renderer/src/components/dialogs/SimulationExperimentViewSettingsDialog.vue | Replaced InputNumber components with InputScientificNumber for better scientific notation support |
| src/renderer/package.json | Updated @types/node version and bumped package version |
| package.json | Updated @types/node version and bumped package version |
| bun.lock | Updated lock file to reflect @types/node version change |
| src/renderer/bun.lock | Updated lock file to reflect @types/node version change |
Comments suppressed due to low confidence (1)
src/renderer/src/components/widgets/InputScientificNumber.vue:38
- The updateValue function emits on every keystroke, which differs from the previous implementation that only emitted on blur or Enter key press. This could cause performance issues or unwanted side effects, especially when typing scientific notation like "1.0e-7" character by character. Consider emitting only on blur or Enter key, or add a debounce mechanism to avoid processing incomplete values.
emit('update:modelValue', null);
return;
}
const parsedValue = parseFloat(value);
emit('update:modelValue', Number.isNaN(parsedValue) ? null : parsedValue);
}
</script>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/renderer/src/components/dialogs/SimulationExperimentViewSettingsDialog.vue
Outdated
Show resolved
Hide resolved
src/renderer/src/components/dialogs/SimulationExperimentViewSettingsDialog.vue
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
180c023 to
207c051
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #371.